<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>溢出替换为省略号</title>
</head>
<style>
    div{
        width: 200px;
        background-color: yellow;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
<body>
    <div>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci amet asperiores nam nulla provident similique, totam? Adipisci blanditiis deleniti, dignissimos dolorem ducimus error labore necessitatibus nobis optio quaerat
    </div>
</body>
</html>